package com.sky.controller.admin;

import com.sky.result.Result;
import com.sky.service.OrderOfCService;
import com.sky.vo.OrderVO;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user/order")
public class Order0fCController {


    @Autowired
    private OrderOfCService orderOfcService;

    private static final Logger log = LoggerFactory.getLogger(Order0fCController.class);

    /**
     * 查询订单详情
     * @param id
     * @return
     */
    @GetMapping("orderDetail/{id}")
    public Result<OrderVO> findOrderOfC(@PathVariable Integer id){
        log.info("查询订单详情：{}",id);
        OrderVO orderVO=orderOfcService.findOrderOfC(id);
        return Result.success(orderVO);
    }

}
